package com.vitech.javacertification.oo.testingEnums;

import com.vitech.javacertification.oo.enums.Colors;
import com.vitech.javacertification.oo.enums.States;


public class UsingEnums {

	private static States x;

	public static void main(String... strings) {

		States state = States.valueOf("IDLE");
					
		System.out.println(state.valueOf("IDLE"));
		
		States[] stateValues = States.values();
				
		System.out.println(state.name());
		
		for (States v : stateValues)
			System.out.println(v);
		
		System.out.println();
		
		switch (state) {
		
		case IDLE:
			System.out.println(state.getSize());
			break;

		case RUNNING:
			System.out.println(state.getSize());
			break;
		
		case SLEEPING:
			System.out.println(state.getSize());
			break;
		
		default:
			System.out.println("default");
			break;
		}
				
		System.out.println("Colors ...");
				
		Colors color = Colors.RED;
		
		System.out.println(color.toString());
		
		
		switch (color){

		case RED:			
			System.out.println("it is red");
			break;
			
		case BLUE:
			
			System.out.println("it is blue");		
		}		
	}
}
